Skip to content

Drop Python 3.9; test on Python 3.13; drop NumPy 1.21; skip CUDA install #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 15, 2025

Conversation

crusaderky
Copy link
Contributor

@crusaderky crusaderky commented Apr 10, 2025

Follow-up from #266

  • Bump up minimum NumPy version from 1.21 to 1.22, in alignment with scikit-learn minimum
  • Bump up minimum Python version from 3.9 to 3.10; again this is possible thanks to a recent dependency bump in scikit-learn (closes Drop Python 3.9 #230)
  • Run tests on Python 3.13
  • Only test on lowest and highest Python versions
  • Don't install CUDA stack (closes CI installs GPU libraries #284)
  • Don't install alternative backends when testing numpy 1.x and dev
  • Closes post 1.11 cleanup tasks #258
  • Run array-api-tests locally with --max-examples 100000 on NumPy 1.22
  • Run array-api-tests locally with --max-examples 1000 on all other numpy versions
  • Disable fail-fast (I lost count of how many times it caused attrition)

@@ -100,8 +95,6 @@ version.
- As with NumPy, type annotations and positional-only arguments may not
exactly match the spec for functions that are not wrapped at all.

The minimum supported PyTorch version is 1.13.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not advertise what you don't test.

@@ -131,8 +124,6 @@ For `linalg`, several methods are missing, for example:
- `matrix_rank`
Other methods may only be partially implemented or return incorrect results at times.

The minimum supported Dask version is 2023.12.0.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not advertise what you don't test. Also helplessly obsolete; we know for sure that less than 2024.9.0 won't work.

@@ -24,11 +23,14 @@ classifiers = [

[project.optional-dependencies]
cupy = ["cupy"]
dask = ["dask"]
dask = ["dask>=2024.9.0"]
Copy link
Contributor Author

@crusaderky crusaderky Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be a good idea to completely remove all mentions of minimum versions until we have unit tests in place for them (i.e. not anytime soon).

numpy = ["numpy"]
# Note: array-api-compat follows scikit-learn minimum dependencies, which support
# much older versions of NumPy than what SPEC0 recommends.
numpy = ["numpy>=1.22"]
pytorch = ["torch"]
sparse = ["sparse>=0.15.1"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same.

# attributes are np.float32 instead of float
# (see also https://github.com/data-apis/array-api/issues/405)
array_api_tests/test_data_type_functions.py::test_finfo[float32]
array_api_tests/test_data_type_functions.py::test_finfo[complex64]

# Rounding error near infinity
array_api_tests/test_operators_and_elementwise_functions.py::test_clip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to crop up only when the test is run on its own

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__imod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[remainder(x1, x2)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested these and could reproduce none of the core dumps

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't say I fancy chasing segfaults down the line. OTOH we won't be able to remove these skips otherwise, so OK, let's live dangerously and see if these reappear.

array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__imod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[remainder(x1, x2)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could reproduce none of these

@crusaderky crusaderky changed the title Drop Python 3.9; Test on Python 3.13; drop NumPy 1.21; skip CUDA install Drop Python 3.9; test on Python 3.13; drop NumPy 1.21; skip CUDA install Apr 10, 2025
@crusaderky crusaderky marked this pull request as ready for review April 10, 2025 17:36
@crusaderky
Copy link
Contributor Author

@ev-br ready for review

This reverts commit 3bc8ffa.
Copy link
Member

@ev-br ev-br left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing skips which are claimed to have caused segfaults feels a bit dangerous; let's give it a shot and see if segfaults reappear.

The rest is great, thank you @crusaderky

# type promotion issues
# NOTE: some of these may not fail until one runs array-api-tests with
# --max-examples 100000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, this is really trying hard to fish these out :-)

array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__imod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[remainder(x1, x2)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't say I fancy chasing segfaults down the line. OTOH we won't be able to remove these skips otherwise, so OK, let's live dangerously and see if these reappear.

@ev-br ev-br merged commit bff3bf4 into data-apis:main Apr 15, 2025
23 checks passed
@ev-br ev-br added this to the 1.12 milestone Apr 15, 2025
@crusaderky crusaderky deleted the np122 branch April 15, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI installs GPU libraries post 1.11 cleanup tasks Drop Python 3.9
2 participants